package com.qf.utils;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;

public class EsClient {
    public static RestHighLevelClient createClient(){
        HttpHost httpHost=new HttpHost("192.168.163.128",9200);
        RestClientBuilder builder= RestClient.builder(httpHost);
        RestHighLevelClient client=new RestHighLevelClient(builder);
        return client;
    }

}
